Compile fix for Ubuntu. Fix valgrind warning from scribble code.
authorrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 31 Dec 2013 19:43:08 +0000 (19:43 +0000)
committerrobertlipe@gmail.com <robertlipe@gmail.com@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 31 Dec 2013 19:43:08 +0000 (19:43 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4680 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/gbfile.cc
gpsbabel/google.cc

index d417e15e109cb95c1ffefe74cb91f453f02fe52a..7244e7390d46aedab6193c4630ef517632d3e343 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 #include "defs.h"
-#include "zconf.h"
+#include "zlib/zconf.h"
 #include "gbfile.h"
 
 #include <assert.h>
index 6ce27aa9520e8d7f80c0e768308dcbea429017c7..c18e7b0498b756a8360485742d0e4a3aaa01118c 100644 (file)
@@ -255,10 +255,10 @@ void goog_poly_e(xg_string args, const QXmlStreamAttributes* unused)
 // NEW_STRINGS FIXME(robertlipe): this is broken somehow there should be no need
 // to overallocate like this, but it's needed ot get an1 to not scribble
 // on itself.
-      wpt_tmp->shortname = (char*) xmalloc(7000);
 #if NEW_STRINGS
       wpt_tmp->shortname = QString().sprintf( "\\%5.5x", serial++);
 #else
+      wpt_tmp->shortname = (char*) xmalloc(7);
       sprintf(wpt_tmp->shortname, "\\%5.5x", serial++);
 #endif
       route_add_wpt(routehead[goog_segroute], wpt_tmp);